Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughAdds a new Home dashboard tab to OwlPlug showing plugin/project metrics, a top-5 file-size bar chart, scan-progress animation, and setup suggestions. Splits ChangesHome Dashboard, Welcome Dialog Redesign, and Scan Event Split
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@owlplug-client/src/main/java/com/owlplug/core/controllers/dialogs/WelcomeDialogController.java`:
- Around line 91-107: The buildFormatToggles method uses a hardcoded index
get(2) to disable the AU format row on non-macOS systems, which is fragile and
will break if the format order changes. Instead of relying on the hardcoded
index, capture a direct reference to the AU format row returned by
buildFormatRow when PluginFormat.AU is passed, store it in a variable, and then
use that variable reference to call setDisable(true) in the conditional block
that checks for non-macOS operating systems. This eliminates the dependency on
array position and makes the code more maintainable.
In
`@owlplug-client/src/main/java/com/owlplug/core/controllers/HomeController.java`:
- Around line 222-233: The refresh() method performs multiple synchronous
database queries (pluginRepository.count(), pluginRepository.countByFormat(),
dawProjectRepository.count(), pluginLookupRepository.countByResult(),
pluginService.getDirectoriesExplorationSet(), and
projectService.getProjectDirectories()) directly on the UI thread, which blocks
JavaFX interactions. Move these data fetching operations into a background task
(using Task or similar threading mechanism), collect all the metric results, and
then apply the UI updates back on the JavaFX thread using FX.run(). Apply the
same pattern to the refreshFileSizeChart() method which also queries the
database synchronously. This ensures I/O operations do not freeze the user
interface.
- Around line 315-331: The handle method for PluginScanStartedEvent shows the
progress pane and starts the rotation animation, but the corresponding handle
method for PluginScanCompletedEvent only hides it when the scan succeeds. To fix
this, add event listener handler methods for scan failure and cancellation
events (likely PluginScanFailedEvent or similar terminal states) that perform
the same cleanup as the PluginScanCompletedEvent handler: hide the
scanProgressPane, set managed to false, and stop the scanRotation animation.
Alternatively, extract the cleanup logic (hide, setManaged, stop) into a shared
private method and call it from all terminal event handlers to reduce
duplication.
- Around line 281-285: The current implementation in the Platform.runLater()
lambda uses name equality to match chart data back to FileStat objects, but this
is unreliable when multiple top entries have the same name, causing incorrect
tooltip/label data to be displayed. Instead of filtering topStats by matching
fs.getName().equals(data.getYValue()), use a more reliable matching approach
such as using the index position of the data point in the series or a unique
identifier from the FileStat object that corresponds to the chart data, ensuring
each data point maps to exactly the correct FileStat regardless of duplicate
names.
In
`@owlplug-client/src/main/java/com/owlplug/plugin/components/PluginTaskFactory.java`:
- Around line 124-127: The scanTask in PluginTaskFactory only publishes
PluginScanCompletedEvent in the success path via setOnSucceeded, but does not
emit any terminal event when the task fails or is cancelled. Add setOnFailed and
setOnCancelled handlers to the scanTask (alongside the existing setOnSucceeded
handler) that also publish PluginScanCompletedEvent to ensure UI consumers
receive a signal that the scan has ended regardless of whether it succeeded,
failed, or was cancelled.
In `@owlplug-client/src/main/resources/owlplug.css`:
- Around line 794-795: The stylelint error occurs because type selectors in the
CSS stylesheet are using uppercase naming (such as Label, Button) when they must
be lowercase per stylelint rules (such as label, button). Locate and fix all 9
instances of uppercase type selectors throughout the file by converting them to
lowercase. This includes the selector Label in the .dashboard-scan-indicator
rule at line 794, and all other uppercase type selectors referenced at the
additional line numbers mentioned in the comment. Ensure all CSS type selectors
consistently use lowercase convention to satisfy stylelint validation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 43bba058-8b76-47e9-a551-ac6cdccccd3f
📒 Files selected for processing (16)
owlplug-client/src/main/java/com/owlplug/core/controllers/HomeController.javaowlplug-client/src/main/java/com/owlplug/core/controllers/MainController.javaowlplug-client/src/main/java/com/owlplug/core/controllers/dialogs/WelcomeDialogController.javaowlplug-client/src/main/java/com/owlplug/core/services/OptionsService.javaowlplug-client/src/main/java/com/owlplug/plugin/components/PluginTaskFactory.javaowlplug-client/src/main/java/com/owlplug/plugin/controllers/PluginsController.javaowlplug-client/src/main/java/com/owlplug/plugin/events/PluginScanCompletedEvent.javaowlplug-client/src/main/java/com/owlplug/plugin/events/PluginScanStartedEvent.javaowlplug-client/src/main/java/com/owlplug/plugin/repositories/FileStatRepository.javaowlplug-client/src/main/java/com/owlplug/plugin/repositories/PluginRepository.javaowlplug-client/src/main/java/com/owlplug/project/repositories/PluginLookupRepository.javaowlplug-client/src/main/java/com/owlplug/project/services/ProjectService.javaowlplug-client/src/main/resources/fxml/HomeView.fxmlowlplug-client/src/main/resources/fxml/MainView.fxmlowlplug-client/src/main/resources/fxml/dialogs/WelcomeView.fxmlowlplug-client/src/main/resources/owlplug.css
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@owlplug-client/src/main/java/com/owlplug/core/controllers/TaskBarController.java`:
- Around line 88-90: In the TaskBarController class where the failed task error
dialog is being set up (in the setOnAction lambda), guard against null
exceptions by checking if task.getException() is null before dereferencing it.
If the exception is null, provide null-safe fallback values for both the title
and content parameters being passed to the showErrorDialog method instead of
calling getMessage() and toString() directly on a potentially null exception
object.
In `@owlplug-client/src/main/resources/fxml/TaskBarView.fxml`:
- Around line 22-28: The logsButton and taskHistoryButton controls in
TaskBarView.fxml are icon-only buttons with no textual affordance, making them
inaccessible to screen readers and keyboard users. Add accessible labels by
including accessibleText attributes to both buttons with descriptive text like
"Logs" and "Task History", and also add Tooltip elements nested inside each
button to provide additional context for all users when hovering over the
buttons.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: c3eae0ab-8671-410a-a14c-b5f3271251a7
📒 Files selected for processing (9)
owlplug-client/src/main/java/com/owlplug/core/components/ApplicationDefaults.javaowlplug-client/src/main/java/com/owlplug/core/controllers/HomeController.javaowlplug-client/src/main/java/com/owlplug/core/controllers/TaskBarController.javaowlplug-client/src/main/java/com/owlplug/core/controllers/dialogs/WelcomeDialogController.javaowlplug-client/src/main/java/com/owlplug/core/utils/TimeUtils.javaowlplug-client/src/main/java/com/owlplug/plugin/components/PluginTaskFactory.javaowlplug-client/src/main/resources/fxml/HomeView.fxmlowlplug-client/src/main/resources/fxml/TaskBarView.fxmlowlplug-client/src/main/resources/owlplug.css
🚧 Files skipped from review as they are similar to previous changes (4)
- owlplug-client/src/main/resources/fxml/HomeView.fxml
- owlplug-client/src/main/resources/owlplug.css
- owlplug-client/src/main/java/com/owlplug/core/controllers/HomeController.java
- owlplug-client/src/main/java/com/owlplug/core/controllers/dialogs/WelcomeDialogController.java
Requires #464